From: Philip Kaludercic Date: Sun, 16 Jul 2023 11:56:23 +0000 (+0200) Subject: Ensure 'existing-filename' has 'bounds-of-thing-at-point' X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~14^2~18^2~4917^2~3 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b6207ee4dcb17106262d278fd11408edd4a55316;p=emacs.git Ensure 'existing-filename' has 'bounds-of-thing-at-point' * lisp/thingatpt.el (existing-filename): Define 'bounds-of-thing-at-point' for 'existing-filename'. (Bug#64664) --- diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 408713dda1a..72acb0b749f 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -360,6 +360,10 @@ E.g.: (and (file-exists-p filename) filename))) +(put 'existing-filename 'bounds-of-thing-at-point + (lambda () + (and (thing-at-point 'existing-filename) + (bounds-of-thing-at-point 'filename)))) (put 'existing-filename 'thing-at-point 'thing-at-point-file-at-point) ;; Faces